package com.nyc.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author 26917
 */
@SpringBootApplication(exclude = {RabbitAutoConfiguration.class})
public class SpringBootDemoApp {
    public static void main(String[] args) {
        // spring容器的初始化操作
        // ApplicationContext ac = new AnnotationConfigApplicationContext(SpringBootDemoApp.class);
        // springboot的启动就是一个spring容器初始化的操作过程
        ConfigurableApplicationContext run = SpringApplication.run(SpringBootDemoApp.class, args);
        String[] beanDefinitionNames = run.getBeanDefinitionNames();
        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println(beanDefinitionName);
        }
    }
}